package com.chrray.position.domain;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.chrray.position.enums.YesNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;

/**
 * 用户企业认证信息 对象
 *
 * @author wusiwee
 * @email wusiwee@163.com
 * @since 1.0.1 2024-08-07
 */

@Data
@ApiModel(description = "用户企业认证信息")
@TableName("fd_auth_enterprise")
public class FdAuthEnterprise extends Model<FdAuthEnterprise> {
	@ApiModelProperty(value = "主键")
	@TableId(type = IdType.AUTO)
	private Long id;

	@ApiModelProperty(value = "关联用户id")
	private Long userId;

	@ApiModelProperty(value = "营业执照照片")
	private String certImg;

	@ApiModelProperty(value = "企业名称")
	private String enterpriseName;

	@ApiModelProperty(value = "统一社会信用代码")
	private String regNum;

	@ApiModelProperty(value = "编号")
	private String serial;

	@ApiModelProperty(value = "法人姓名")
	private String legalRepresentative;

	@ApiModelProperty(value = "组织形式:个体经营/有限责任公司")
	private String typeOfOrganization;

	@ApiModelProperty(value = "注册日期/成立日期")
	private String registeredDate;

	@ApiModelProperty(value = "营业期限")
	private String validPeriod;

	@ApiModelProperty(value = "认证时间")
	private Date createTime;

	private Integer delFlag;


	public FdAuthEnterprise findOneByUserId(Long userId) {
		LambdaQueryWrapper<FdAuthEnterprise> query = new LambdaQueryWrapper<>();
		query.eq(FdAuthEnterprise::getUserId, userId);
		return this.selectOne(query);
	}

}
